LearningStore Constructor (string, string)

Initializes a new instance of the LearningStore class.

Parent Type: LearningStore

Namespace: Microsoft.LearningComponents.Storage

Assembly: Microsoft.LearningComponents.Storage.dll

Syntax
C#

public LearningStore (
string connectionString,
string userKey

)

Parameters

connectionString

The connection used to access the SQL server database. The string is the same format as a connection string passed to System.Data.SqlClient.SqlConnection

userKey

The unique key of the user accessing the database.

Exceptions
Exception type Condition
ArgumentNullException

connectionString or userKey is a null reference.

Example

The following code opens the store located in the "Mls" database of the "Learning" server with the user key "Bob":

C#
LearningStore store = new LearningStore("Server=Learning;Database=Mls;Integrated Security=true", "Bob");